home *** CD-ROM | disk | FTP | other *** search
/ MacWorld 1999 January - Disc 2 / Macworld (1999-01) (Disk 2).dmg / Serious Demos / Symbolic Composer 4.2 / Environment / Projects / Tutorial Material / Pitch and Rhythm Tutorial / 12 tone row - midifile next >
Lisp/Scheme  |  1998-10-26  |  5KB  |  145 lines

  1. ;  A template for 12 note pre-composition
  2.  
  3. ; - write in your Row , Starting pitch and Pitch class numbers.
  4. ; - When the material has compiled to MIDIfile set pitch zones 
  5. ;   on your sequencer that you wish the rows to conform to.
  6. ;   Most sequencers have a Transform / Logical Edit / Boolean Editor
  7. ;   which will do this in 1 operation. Set Pitch Limit zones and 
  8. ;   transpose notes lying outside the higher limit down an octave.
  9.  
  10. (setq row '(a c d f e h i g b l j k))
  11. (setq pitch (activate-tonality (chromatic e 5)))
  12. (setq pcnos '((0 2 3 5 4 7 8 6 1 11 9 10)))
  13.  
  14. ; - transposition 
  15.  
  16. (setq row-ta (symbol-transpose 0 row))
  17. (setq row-tb (symbol-transpose 1 row))
  18. (setq row-tc (symbol-transpose 2 row))
  19. (setq row-td (symbol-transpose 3 row))
  20. (setq row-te (symbol-transpose 4 row))
  21. (setq row-tf (symbol-transpose 5 row))
  22. (setq row-tg (symbol-transpose -6 row))
  23. (setq row-th (symbol-transpose -5 row))
  24. (setq row-ti (symbol-transpose -4 row))
  25. (setq row-tj (symbol-transpose -3 row))
  26. (setq row-tk (symbol-transpose -2 row))
  27. (setq row-tl (symbol-transpose -1 row))
  28.  
  29. (setq rowt (append row-ta row-tb row-tc row-td row-te
  30.         row-tf row-tg row-th row-ti row-tj row-tk row-tl))
  31.  
  32. ; - this should produce the same result as row-t
  33.  
  34. ; - retrogression
  35.  
  36. (setq row-ra (symbol-retrograde row-ta))
  37. (setq row-rb (symbol-retrograde row-tb))
  38. (setq row-rc (symbol-retrograde row-tc))
  39. (setq row-rd (symbol-retrograde row-td))
  40. (setq row-re (symbol-retrograde row-te))
  41. (setq row-rf (symbol-retrograde row-tf))
  42. (setq row-rg (symbol-retrograde row-tg))
  43. (setq row-rh (symbol-retrograde row-th))
  44. (setq row-ri (symbol-retrograde row-ti))
  45. (setq row-rj (symbol-retrograde row-tj))
  46. (setq row-rk (symbol-retrograde row-tk))
  47. (setq row-rl (symbol-retrograde row-tl))
  48.  
  49. (setq rowr (append row-ra row-rb row-rc row-rd row-re 
  50.         row-rf row-rg row-rh row-ri row-rj row-rk row-rl))
  51.  
  52. ; - inversion
  53.  
  54. (setq row-ia (symbol-transpose 12 (symbol-inversion 'a row)))
  55. (setq row-ib (symbol-transpose 11 (symbol-inversion 'b row)))
  56. (setq row-ic (symbol-transpose 10 (symbol-inversion 'c row)))
  57. (setq row-id (symbol-transpose 9 (symbol-inversion 'd row)))
  58. (setq row-ie (symbol-transpose 8 (symbol-inversion 'e row)))
  59. (setq row-if (symbol-transpose 7 (symbol-inversion 'f row)))
  60. (setq row-ig (symbol-transpose 6 (symbol-inversion 'g row)))
  61. (setq row-ih (symbol-transpose 5 (symbol-inversion 'h row)))
  62. (setq row-ii (symbol-transpose 4 (symbol-inversion 'i row)))
  63. (setq row-ij (symbol-transpose 3 (symbol-inversion 'j row)))
  64. (setq row-ik (symbol-transpose 2 (symbol-inversion 'k row)))
  65. (setq row-il (symbol-transpose 1 (symbol-inversion 'l row)))
  66.  
  67. (setq rowi (append row-ia row-ib row-ic row-id row-ie 
  68.         row-if row-ig row-ih row-ii row-ij row-ik row-il))
  69.  
  70. ; - retrograde-inversion
  71.  
  72. (setq row-ria 
  73.       (symbol-retrograde
  74.             (symbol-transpose 12 (symbol-inversion 'a row))))
  75. (setq row-rib 
  76.       (symbol-retrograde
  77.             (symbol-transpose 11 (symbol-inversion 'b row))))
  78. (setq row-ric 
  79.       (symbol-retrograde
  80.             (symbol-transpose 10 (symbol-inversion 'c row))))
  81. (setq row-rid 
  82.       (symbol-retrograde
  83.             (symbol-transpose 9 (symbol-inversion 'd row))))
  84. (setq row-rie 
  85.       (symbol-retrograde
  86.             (symbol-transpose 8 (symbol-inversion 'e row))))
  87. (setq row-rif 
  88.       (symbol-retrograde
  89.             (symbol-transpose 7 (symbol-inversion 'f row))))
  90. (setq row-rig 
  91.       (symbol-retrograde
  92.             (symbol-transpose 6 (symbol-inversion 'g row))))
  93. (setq row-rih 
  94.       (symbol-retrograde
  95.             (symbol-transpose 5 (symbol-inversion 'h row))))
  96. (setq row-rii 
  97.       (symbol-retrograde
  98.             (symbol-transpose 4 (symbol-inversion 'i row))))
  99. (setq row-rij 
  100.       (symbol-retrograde
  101.             (symbol-transpose 3 (symbol-inversion 'j row))))
  102. (setq row-rik 
  103.       (symbol-retrograde
  104.             (symbol-transpose 2 (symbol-inversion 'k row))))
  105. (setq row-ril 
  106.       (symbol-retrograde
  107.             (symbol-transpose 1 (symbol-inversion 'l row))))
  108.  
  109. (setq rowri (append row-ria row-rib row-ric row-rid row-rie 
  110.         row-rif row-rig row-rih row-rii row-rij row-rik row-ril))
  111.  
  112. (def-symbol 
  113.   voicet  rowt  
  114.   voicer  rowr
  115.   voicei  rowi 
  116.   voiceri rowri
  117. )
  118.  
  119. (def-length
  120.   voicet '(1/8)
  121.   voicer '(1/8)
  122.   voicei '(1/8)
  123.   voiceri '(1/8)
  124. )
  125.  
  126. (def-zone
  127.   voicet '(12/1.)
  128.   voicer '(12/1.)
  129.   voicei '(12/1.)
  130.   voiceri '(12/1.)
  131. )
  132.  
  133. (def-tonality
  134.   voicet pitch 
  135.   voicer pitch
  136.   voicei pitch 
  137.   voiceri pitch 
  138. )
  139.  
  140. (compile-instrument-p "ccl;output:" "tonerows"
  141.   voicet
  142.   voicer
  143.   voicei
  144.   voiceri
  145. )